package com.kly.user.enums;

public enum ConversationType {

    FIRST_CONVERSATION(1, 1, "firstSession", "破冰会话数"),

    EFFECTIVE_CONVERSATIONS(2, 5, "validSession", "有效会话数"),

    DEEP_CONVERSATIONS(3, 30, "deepSession", "深度会话数"),

    HUNDRED_CONVERSTIONS(4, 50, "sessionLimit", "会话消息上限"),

    CONVERSATIONS_NUMBER(5,0,"sessionNumber","会话数量"),


    ;


    public static ConversationType fromType(int size) {
        for (ConversationType conversationType : values()) {
            if (conversationType.getSize() == size) {
                return conversationType;
            }
        }
        return null;
    }

    private int code;

    private int size;

    private String value;

    private String description;


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    ConversationType(int code, int size, String value, String description) {
        this.code = code;
        this.size = size;
        this.value = value;
        this.description = description;
    }
}
